home *** CD-ROM | disk | FTP | other *** search
- // Author: Wesley Curtis Lefebvre
-
- #ifndef __GLOBAL_H__
- #define __GLOBAL_H__
-
- #include <stdio.h>
- #include <float.h>
- #include <string.h>
- #include <malloc.h>
- #include <stdlib.h>
- #include <time.h>
- #include <math.h>
-
- #define nil NULL
- #define YES 1
- #define NO 0
- #define MAX(x,y) x>y?x:y;
- #define PI 3.1415927
- #define NSInt int
- #define NSUInt UINT
- #define NSLong long
- #define NSFloat float
-
- #define DLL_PARAM_ROWS 5
- #define DLL_PARAM_COLS 3
-
- #ifndef FALSE
- #define FALSE 0
- #endif
- #ifndef TRUE
- #define TRUE 1
- #endif
- #ifndef NULL
- #define NULL 0
- #endif
-
- typedef int BOOL;
-
- typedef struct {
- NSFloat *data;
- int length;
- } DLLWeights;
-
- typedef struct {
- char parameters[DLL_PARAM_ROWS][DLL_PARAM_COLS][64];
- char parameterNames[DLL_PARAM_ROWS][DLL_PARAM_COLS][64];
- BOOL parameterReallocs[DLL_PARAM_ROWS][DLL_PARAM_COLS];
- } DLLParameters;
-
- typedef struct {
- DLLWeights *weights;
- DLLParameters *parameters;
- void *userData;
- } DLLData;
-
- typedef struct {
- void *function,
- *constructor,
- *destructor;
- DLLData *instance;
- } DLLStruct;
-
- typedef DLLData *(*DLL_Constructor)(DLLData *);
- typedef void (*DLL_Destructor)(DLLData *);
-
- FILE *seekComponent(FILE *, const char *, unsigned int);
- FILE *putComponent(FILE *, const char *, unsigned int);
- //int max(int, int);
-
- #endif // __GLOBAL_H__
-